#!/usr/bin/env python
PACKAGE = "raspicam_node"

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

gen.add("contrast",             int_t,    0, "Contrast",              0,  -100, 100)
gen.add("sharpness",            int_t,    0, "Sharpness",             0,  -100, 100)
gen.add("brightness",           int_t,    0, "Brightness",           50,     0, 100)
gen.add("saturation",           int_t,    0, "Saturation",            0,     0, 100)
gen.add("ISO",                  int_t,    0, "ISO",                 400,   100, 1600)
gen.add("exposure_compensation", int_t,    0, "Exposure Compensation",  0,   -10, 10)
gen.add("video_stabilisation",  bool_t,    0, "Video Stabilisation",  False)
gen.add("vFlip",               bool_t,    0, "vFlip",  False)
gen.add("hFlip",               bool_t,    0, "hFlip",  False)
gen.add("shutter_speed",         int_t,    0, "Shutter Speed (us)",  0,   0, 100000)

gen.add("zoom",       double_t, 0, "Digital zoom",  1.0, 1.0, 4.0)

exp_modes = gen.enum([gen.const("off", str_t, "off", ""),
                    gen.const("auto", str_t, "auto", ""),
                    gen.const("night", str_t, "night", ""),
                    gen.const("nightpreview", str_t, "nightpreview", ""),
                    gen.const("backlight", str_t, "backlight", ""),
                    gen.const("spotlight", str_t, "spotlight", ""),
                    gen.const("sports", str_t, "sports", ""),
                    gen.const("snow", str_t, "snow", ""),
                    gen.const("beach", str_t, "beach", ""),
                    gen.const("verylong", str_t, "verylong", ""),
                    gen.const("fixedfps", str_t, "fixedfps", ""),
                    gen.const("antishake", str_t, "antishake", ""),
                    gen.const("fireworks", str_t, "fireworks", "")],
                    "Exposure modes")
gen.add("exposure_mode", str_t, 0, "Exposure mode", "auto", edit_method=exp_modes)

awb_modes = gen.enum([gen.const("awb_off", str_t, "off", ""),
                    gen.const("awb_auto", str_t, "auto", ""),
                    gen.const("awb_sun", str_t, "sun", ""),
                    gen.const("awb_cloud", str_t, "cloud", ""),
                    gen.const("awb_shade", str_t, "shade", ""),
                    gen.const("awb_tungsten", str_t, "tungsten", ""),
                    gen.const("awb_fluorescent", str_t, "fluorescent", ""),
                    gen.const("awb_incandescent", str_t, "incandescent", ""),
                    gen.const("awb_flash", str_t, "flash", ""),
                    gen.const("awb_horizon", str_t, "horizon", "")],
                    "AWB modes")
gen.add("awb_mode", str_t, 0, "AWB mode", "auto", edit_method=awb_modes)

exit(gen.generate(PACKAGE, "raspicam_node", "Camera"))

